import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * @author yangjiming
 * @create 2021-03-27 16:45
 */
public class FastJson {
    public static void main(String[] args) {
        String jsonStr="{\"age\":22,\"clazz\":\"文科六班\",\"gender\":\"女\",\"id\":\"1500100001\",\"name\":\"施笑槐\"}";
        JSONObject jsonObject = JSON.parseObject(jsonStr);

        Object clazz = jsonObject.get("clazz");
        System.out.println(clazz);

        String s = JSON.toJSONString(jsonStr);
        System.out.println(s);

    }
}
